<template>
   <div class="wrapper">
      <swiper :options="swiperOption">
        <swiper-slide v-for="item of swiperList" v-bind:key="item.id">
          <img class="swiper-img" :src="item.imgUrl">
        </swiper-slide>
        <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
   </div>
</template>

<script>
export default {
  name: "HomeSwiper",
  data: function () {
    return {
      swiperOption: {
        pagination: {
          el: ".swiper-pagination"
        },
        loop: true
      },
      swiperList: [
        {
          id: "01",
          imgUrl:
            "http://img1.qunarzz.com/piao/fusion/1809/91/8d94258b8fcfc02.jpg_750x200_2bff1dbf.jpg"
        },
        {
          id: "02",
          imgUrl:
            "http://img1.qunarzz.com/piao/fusion/1809/6a/847ac7b98f10e202.jpg_750x200_f0593cb5.jpg"
        },
        {
          id: "03",
          imgUrl:
            "http://img1.qunarzz.com/piao/fusion/1809/31/da037478f37cf202.jpg_750x200_a02cf862.jpg"
        }
      ]
    };
  }
};
</script>

<style lang="stylus" scoped>
.wrapper >>> .swiper-pagination-bullet-active {
  background: #fff !important;
}

.wrapper {
  width: 100%;
  height: 0;
  padding-bottom: 26.67%;
  overflow: hidden;

  .swiper-img {
    width: 100%;
  }
}
</style>

